<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.misc.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.project.*" %>

<%@ include file="../init_include.jsp" %>

<%
	int catid=Request.getInt("catid");
	int pageid=Request.getInt("pageid",1);
	int pagerows=Request.getInt("pagerows",Page.getPageRows());
  String ordermode=Request.getString("ordermode","desc");  
  String orderfield=Request.getString("orderfield","tablename.first_field");
	int totalpages=0;
	int totalrows=0;
	ClassnameDB newClassnameDB = new ClassnameDB();
	totalrows=newClassnameDB.getClassnameNum(dbi);
	totalpages = (int)Math.ceil((double)totalrows/pagerows);
	if(pageid>totalpages)
		pageid=totalpages;
	if(pageid<=1)
		pageid=1;
%>	
<html>
<head>
<title>tabledescript</title>
<meta http-equiv="Content-Type" content="text/html; charset=<%=Language.getHTMLLanguageStr()%>">
<link rel="stylesheet" href="<%=Language.getCSSFile(session)%>" type="text/css">
<SCRIPT language=JavaScript1.2 src="../script/Ion_Show.js"></SCRIPT>
<script language="javascript">
<!--

	function Ion_Add() {
		addIon('vmsSelectFrame.jsp','Classname_edit.jsp');
	}	

	function Ion_Del() {
		deleteIon('vmsSelectFrame.jsp','Classname_delete.jsp','tabledescript');		
	}	

	function Ion_Edit() {
		editIon('vmsSelectFrame.jsp','Classname_edit.jsp','tabledescript');
	}		

	function Ion_View() {
		editIon('vmsSelectFrame.jsp','Classname_view.jsp','tabledescript');
	}		
	
	function checkForm() {
	}
-->
</script>
</head>

<body bgColor=#d6d3ce leftMargin=0 
style="BORDER-BOTTOM: 0px outset; BORDER-LEFT: 0px outset; BORDER-RIGHT: 0px outset; BORDER-TOP: 0px outset" 
topMargin=0>

<FORM name="formIon" method="post" action="Classname_list.jsp" onsubmit="return checkForm();">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
  <tr>
    <td class="nagivation" colspan="2"><%=Language.getNameByCode("sys.CurrentPos","Current Position")%>:
    <% 
    Vector vcpath=Category.getLadder(session,"tree",catid);
		out.print(Category.getFullPath(vcpath));
		%>
		</td>
  </tr>
	<tr>
 	 <td align="left"><%=Language.getNameByCode("sys.list"," List")%><%=PageStr.getPageHead(totalrows,pageid,pagerows,totalpages)%>
 	 </td>
 	 <td align=right>
   	<%=PageStr.PageForm(pageid,totalpages)%><input type="submit" name="Submit" value="go" style="width:0">
   </td>
  </tr>
</table>

	<TABLE border=0 cellPadding=0 cellSpacing=1 height="100%" width="100%">
		<input type="hidden" name="catid" value="<%=catid%>">
		<input type="hidden" name="id" value="<%=catid%>">
		<INPUT name="objid" type="hidden">
		<INPUT name="objtext" type="hidden">
		<INPUT name="objflag" type="hidden">
		<INPUT name="actionurl" type="hidden">
		<input type="hidden" name="orderfield" value="<%=orderfield%>">
		<input type="hidden" name="ordermode" value="<%=ordermode%>">
  	<TR>
    <TD>
    <APPLET code=com.ionglobal.gui.Table codeBase=../ height="100%" name=table1 width="100%" VIEWASTEXT mayscript archive="gui.jar">
    <PARAM NAME="columnCount" VALUE="column_Count">    
		<PARAM NAME="sortMode" VALUE="<%=ordermode%>">
    <PARAM NAME="sortField" VALUE="<%=orderfield%>">
    <PARAM NAME="sortFieldList" VALUE="first_field,<insert fieldlist in here>">    
    <PARAM NAME="header" VALUE="no|<insert fielddescript in here>">
    <PARAM NAME="headerAlignment" VALUE="center,header_Alignment">
    <PARAM NAME="columnAlignment" VALUE="left,column_Alignment">
    <PARAM NAME="columnType" VALUE="number,column_Type">
    <PARAM NAME="columnWidth" VALUE="0,column_Width">
    <%	
    ArrayList ar=newClassnameDB.getClassnameList(dbi,pageid,pagerows,orderfield,ordermode);
    for(int i=0;i<ar.size();i++) {
    	Classname newClassname=(Classname)ar.get(i);
		%>
		<PARAM NAME="row_<%=i%>" VALUE="<insert fieldvalue in here>">
		<PARAM NAME="cellImage_<%=i%>_1" VALUE="../images/item.gif">
<% 	
		}
		int count=0;
%>   
    <PARAM NAME="fieldseparator" VALUE="|">
    <PARAM NAME="urlColor" VALUE="black">
    <PARAM NAME="urlStyle" VALUE="noline">
    <PARAM NAME="menu<%=count%>" VALUE="<%=Language.getNameByCode("sys.Edit","Edit Selected ")%>tabledescript">
    <PARAM NAME="menuurl<%=count%>" VALUE="javascript:Ion_Edit();">
    <%count++;%>
    <PARAM NAME="menu<%=count%>" VALUE="<%=Language.getNameByCode("sys.Add","Add New ")%>tabledescript">
    <PARAM NAME="menuurl<%=count%>" VALUE="javascript:Ion_Add();">
    <%count++;%>
    <PARAM NAME="separator<%=count%>" VALUE="Y">    
    <PARAM NAME="menu<%=count%>" VALUE="<%=Language.getNameByCode("sys.Head.Refresh","Refresh")%>">
    <PARAM NAME="menuurl<%=count%>" VALUE="javascript:self.location.reload();">
    <PARAM NAME="separator<%=count%>" VALUE="Y">
    <%count++;%>
    <PARAM NAME="menu<%=count%>" VALUE="<%=Language.getNameByCode("sys.Delete","Delete Selected ")%>tabledescript">
    <PARAM NAME="menuurl<%=count%>" VALUE="javascript:Ion_Del()">
    <PARAM NAME="urltarget" VALUE="header1">
    <PARAM NAME="alternateRowBackground" VALUE="#D0E8FF">
    <PARAM NAME="font" VALUE="Arial,plain,12">
    <PARAM NAME="selectionMode" VALUE="multiple">
    <PARAM NAME="gridOn" VALUE="false">
    <PARAM NAME="gridColor" VALUE="#808080">
    <PARAM NAME="filterBarOn" VALUE="true">
    <PARAM NAME="totalRowOn" VALUE="true">
    <PARAM NAME="decimalCount_10" VALUE="0">
    <PARAM NAME="code" VALUE="com.ionglobal.gui.Table">
    <PARAM NAME="codeBase" VALUE="../">
    <PARAM NAME="height" VALUE="100%">
    <PARAM NAME="name" VALUE="table1">
    <PARAM NAME="width" VALUE="100%">
    <PARAM NAME="VIEWASTEXT" VALUE="">
    <PARAM NAME="mayscript" VALUE="">
    <PARAM NAME="archive" VALUE="gui.jar">
    </APPLET>
	  </TD>
 	</TR>
	</TABLE>
</FORM>
</body>
</html>
<%@ include file="../init_free.jsp" %>